package com.lpf.factory;

public class FactoryMethodPattern {
    public static void main(String[] args) {
        // 使用具体工厂 A 创建产品
        Factory factoryA = new ConcreteFactoryA();
        factoryA.operate(); // 输出：Using Product A

        // 使用具体工厂 B 创建产品
        Factory factoryB = new ConcreteFactoryB();
        factoryB.operate(); // 输出：Using Product B
    }
}